/**
* @author Diego Gadola @ 29/01/2009 
*/
public class DiscussionWidgetActiveForumController {

	private List<DiscussionForum__c> activeForums;
	
	/**
	* Constructor
	*/
	public DiscussionWidgetActiveForumController() {
		findActiveForums();
	}
	
	
	/**
	*@return List<DiscussionForum__c>     	
	*/
	public List<DiscussionForum__c> getActiveForums() {
		return activeForums;	
	}

	
	/**
	* Creater a lsst with active forums
	*/
	public void findActiveForums() {
		activeForums = [SELECT f.PictureId__c, f.Name, f.Id 
						FROM DiscussionForum__c f
						ORDER BY f.MessageCount__c DESC NULLS LAST LIMIT 5];
		if (activeForums == null) {
			activeForums = new List<DiscussionForum__c>();	
		} 
	}
	
	
	/**
	*@return Integer
	*/
	public Integer getActiveForumsSize() {
		return activeForums.size();
	}
	
}